package com.joeyzh.test

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.view.MenuItem
import com.joey.ui.general.BaseActivity
import com.joey.ui.widget.ToastHelper
import com.joeyzh.R
import com.joeyzh.imagepicker.ImagePickerFragment

class TestImagePickerActivity : BaseActivity() {

    var picker: ImagePickerFragment? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        title = "选择图片"
        setContentView(R.layout.test_activity_image_picker)
        picker = ImagePickerFragment()
        supportFragmentManager.beginTransaction().replace(R.id.fr_content_image, picker).commit()
        addRightText("提交")
    }


    override fun onRightClick(itemId: Int, item: MenuItem?) {
        super.onRightClick(itemId, item)
        ToastHelper.show(applicationContext, picker!!.imgsList.toString())
    }
}
